[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
##############################################################################
###+-------------+############################################################
#+-| SET CENTURY |---------------------------------------------------+########
#| +-------------+ The SET CENTURY command controls the century flag |########
#+-------------------------------------------------------------------+########
##############################################################################
##############################################################################
#+--| Syntax |---------------------+##########################################
#|     SET CENTURY <ON || OFF>     |##########################################
#+---------------------------------+##########################################
##############################################################################
##############################################################################
##########+---| Description |--------------------------------------+##########
##########| ON specifies display of the year date variable in four |##########
##########| digits rather than two digits, affecting display of a  |##########
##########| date value, not its storage in a field.                |##########
##########| ------------------------------------------------------ |##########
##########| OFF specifies display of the year date variable in two |##########
##########| digits - the default setting for the SET CENTURY flag. |##########
##########+--------------------------------------------------------+##########
##############################################################################
##############################################################################
#######+-------------------------| NOTE: |----------------------------+#######
#######| The GET System automatically adds 1900 to any year less than |#######
#######|           100, regardless of the SET CENTURY flag.           |#######
#######+--------------------------------------------------------------+#######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| *    Add 1900 to all two-digit year dates.               |#########
#########|                                                          |#########
#########| SET CENTURY ON                                           |#########
#########| ? birthday( "Tom" )                                      |#########
#########| SET CENTURY OFF                                          |#########
#########| ? birthday( "Tom" )                                      |#########
#########|                                                          |#########
#########| Output:                                                  |#########
#########| 8/13/1956                                                |#########
#########| 8/13/56                                                  |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| *    SET CENTURY affects the number of digits            |#########
#########| *    to be edited during a GET                           |#########
#########|                                                          |#########
#########| SET CENTURY ON                                           |#########
#########| @ 1,0 GET date_value        && edit date with 4          |#########
#########|                             &&  digit year               |#########
#########| SET CENTURY OFF                                          |#########
#########| @ 2,0 GET date_value        && edit date with 2          |#########
#########|                             &&  digit year               |#########
#########| READ                                                     |#########
#########+----------------------------------------------------------+#########
##############################################################################

See Also: SET DATE today()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson